package com.pac.weixin.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.common.tools.TimeTools;
import com.pac.weixin.bean.WxPopularizeBean;
import com.pac.weixin.dao.WxPopularizeDao;
import com.pac.weixin.service.WxPopularizeService;

/**
 * 微信推广记录Service实现
 * 
 * @author lujun.chen
 * @version [版本号, 2015年3月5日]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Service(value = "wxPopularizeService")
public class WxPopularizeServiceImpl implements WxPopularizeService {

	@Autowired
	private WxPopularizeDao wxPopularizeDao;

	@Override
	@Transactional(propagation = Propagation.REQUIRED)
	public String addPopularize(WxPopularizeBean wxPopularizeBean) {
		if (null == wxPopularizeBean) {
			return null;
		}
		wxPopularizeBean.setCreateDate(TimeTools.now());
		return wxPopularizeDao.addPopularize(wxPopularizeBean);
	}

}
